function ccacalc(unitchoice,seca,sealb,nalb){

	
var cca=0;
units=" mmol/L";
	

if (!unitchoice){
seca=seca/4;
sealb=sealb*10;
nalb=nalb*10;
units=" mg/dL";
}	
	


// Corrected Calcium = (0.8 * (Normal Albumin - Pt's Albumin)) + Serum Ca  (US units)
cca = (0.02 *(nalb-sealb) + seca);

//round to 2 dec places
cca=Math.round(cca*100)/100;
			


return {
			 cca:cca,
			 units:units

	};		 
}




function ref(){
// display reference
 return "Corrected Calcium = (0.02 x (Normal Albumin - Pt's Albumin)) + Serum Ca  (in SI units)";

}